package com.koro.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koro.annotation.Column;
import com.koro.annotation.ColumnComment;
import com.koro.annotation.Table;
import com.koro.constants.MySqlTypeConstant;
import lombok.Data;

import java.util.Date;

@Data
@TableName("job_info_log")
@Table(name = "job_info_log", comment = "定时任务调度记录表表")
public class JobInfoLog {


    @TableId(value = "job_log_id", type = IdType.AUTO)
    @Column(name = "job_log_id", type = MySqlTypeConstant.BIGINT, length = 20, isKey = true, isAutoIncrement = true)
    @ColumnComment(value = "主键，自动递增")
    private Long jobLogId;

    @Column(name = "job_name", type = MySqlTypeConstant.VARCHAR, length = 64)
    @ColumnComment(value = "任务名称")
    private String jobName;

    @Column(name = "job_group", type = MySqlTypeConstant.VARCHAR, length = 64)
    @ColumnComment(value = "任务组名")
    private String jobGroup;

    @Column(name = "invoke_target", type = MySqlTypeConstant.VARCHAR, length = 64)
    @ColumnComment(value = "调用目标字符串")
    private String invokeTarget;

    @Column(name = "job_message", type = MySqlTypeConstant.VARCHAR, length = 2048)
    @ColumnComment(value = "日志信息")
    private String jobMessage;

    @Column(name = "status", type = MySqlTypeConstant.VARCHAR, length = 1)
    @ColumnComment(value = "执行状态（0正常 1失败）")
    private String status;

    @Column(name = "exception_info", type = MySqlTypeConstant.VARCHAR, length = 2048)
    @ColumnComment(value = "异常信息")
    private String exceptionInfo;

    @Column(name = "start_time", type = MySqlTypeConstant.DATETIME)
    @ColumnComment(value = "开始时间")
    private Date startTime;

    @Column(name = "end_time", type = MySqlTypeConstant.DATETIME)
    @ColumnComment(value = "结束时间")
    private Date endTime;
}
